package him.serviceimple;

import java.util.List;

import him.dao.SubjectDAO;
import him.dto.coursemanage.SubjectDTO;
import him.service.SubjectService;

public class SubjectServiceImple implements SubjectService {
	private SubjectDAO subjectDAO;
	private static SubjectServiceImple subjectService;
	
	public static SubjectServiceImple getInstance(){
		if (subjectService==null) {
			subjectService = new SubjectServiceImple();
		}
		return subjectService;
	}
	@Override
	public boolean deleteSubject(String detailcode) {
		return subjectDAO.deleteSubject(detailcode);
	}

	@Override
	public List<SubjectDTO> getAllSubjectList() {
		return subjectDAO.getAllSubjectList();
	}

	@Override
	public boolean insertSubject(SubjectDTO dto) {
		return subjectDAO.insertSubject(dto);
	}

	@Override
	public boolean updateSubject(SubjectDTO dto) {
		return subjectDAO.updateSubject(dto);
	}
	@Override
	public SubjectDTO getSubjectDetail(SubjectDTO dto) {
		return subjectDAO.getSubjectDetail(dto);
	}
	@Override
	public List<SubjectDTO> getAllSubjectName() {
		return subjectDAO.getAllSubjectName();
	}

}
